Added comment
authorJeroen van der Heijden <jeroen@transceptor.technology>
Fri, 18 May 2018 08:07:54 +0000 (10:07 +0200)
committerJeroen van der Heijden <jeroen@transceptor.technology>
Fri, 18 May 2018 08:07:54 +0000 (10:07 +0200)
src/siri/db/series.c

index 73d6ed2ee105f79860abb4001dab0836b51e2fe4..71388d12296a0d4c5fd85e304d17ff3552efbb32 100644 (file)
@@ -818,8 +818,10 @@ siridb_points_t * siridb_series_get_first(
 
     (*required_shard)++;
 
+#if DEBUG
     /* if not in the buffer, then if must be in a shard */
     assert (series->idx_len);
+#endif
 
     idx_t * first = series->idx;
 
@@ -838,7 +840,11 @@ siridb_points_t * siridb_series_get_first(
             &start,
             series->flags & SIRIDB_SERIES_HAS_OVERLAP);
 
+#if DEBUG
+    /* we must have at least one point, more points are possible when
+     * having multiple points at the same time-stamp. */
     assert (points->len);
+#endif
 
     while (points->len > 1)
     {